<!DOCTYPE html>
<html lang="zh-CN">
<head>
<script src="https://cdn.staticfile.org/jquery/1.10.2/jquery.min.js"></script>
<meta charset="utf-8" />
<title>美站库 炫美网站大全</title>
<link rel="stylesheet" type="text/css" href="images/index.css">
</head>
<body>
<div id="header">
	<div id="top" class="auto">
		<div class="logo">
			<h1>
				<img src="images/logo.png"/>
				<span>炫美网站大全</span>
			</h1>
		</div>
		<div class="serach">
		<form target="_blank" action="search.html">
			<input id="searchText" class="text" type="text" />
			<input id="searchButton" class="submit" type="button" value="搜索" />
		</form>
			</div>
	</div>
	<div id="nav" class="auto">
		<ul>
			<li><a href="#">首页</a></li>
			<li><a href="#">提交站点</a></li>
		</ul>
	</div>
	<div id="runplay" class="auto">
		<div class="left">
			<a href="#"><img src="images/img1.jpg"/></a>
		</div>
		<div class="right">
			<dl>
				<dt id="runplayH">炫美网站，尽在美站库</dt>
				<dd class="txt" id="rate">本网站收集互联网上各种炫美网站......</dd>
				<dd class="btn">
				<a href="#">查看更多</a>
				</dd>
			</dl>
		</div>
	</div>
</div>
<div id="main">
	<div id="main1">
		<div id="wrap">
			<div id="leftBody">
				<div class="leftDiv1">
					<h2>美站库</h2>
					<p>美站库是<a id="rsCount" href="http://www.sifangku.com" target="_blank">私房库</a>视频html课程中的第一个项目实战课！</p>
				</div>
				<div class="leftDiv2">
				<h2>炫美站点</h2>
				<ul>
					<li>
                        <a href="https:\/\/movie.douban.com\/subject\/30466832\/"> <img src="https://gss3.bdstatic.com/-Po3dSag_xI4khGkpoWK1HF6hhy/baike/c0%3Dbaike272%2C5%2C5%2C272%2C90/sign=16ecdf0b47540923be646b2cf331ba6c/a686c9177f3e6709526064d735c79f3df8dc55b1.jpg" height="125px"/></a>
						<p>独家记忆番外之相信爱</p>
                    </li>
					<li>
                        <a href="https:\/\/movie.douban.com\/subject\/26374197\/"> <img src="https://img3.doubanio.com/view/photo/l/public/p2542867516.jpg" height="125px"/></a>
						<p>蜘蛛侠：平行宇宙</p>
                    </li>
					<li>
                        <a href="https:\/\/movie.douban.com\/subject\/26633257\/"> <img src="https://img3.doubanio.com/view/photo/l/public/p2541183610.jpg" height="125px"/></a>
						<p>地球最后的夜晚</p>
                    </li>
					<li>
                        <a href="https:\/\/movie.douban.com\/subject\/30377703\/","playable"><img src="https://gss1.bdstatic.com/9vo3dSag_xI4khGkpoWK1HF6hhy/baike/c0%3Dbaike272%2C5%2C5%2C272%2C90/sign=e6d559400746f21fdd395601974d0005/3b87e950352ac65c212771c8f6f2b21193138a6e.jpg" height="125px"/></a>
						<p>来电狂响</p>
                    </li>
					<li>
                        <a href="https:\/\/movie.douban.com\/subject\/27119586\/"><img src="https://gss1.bdstatic.com/-vo3dSag_xI4khGkpoWK1HF6hhy/baike/c0%3Dbaike272%2C5%2C5%2C272%2C90/sign=e4d4df0f6a09c93d13ff06a5fe5493b9/dcc451da81cb39db9b3ef257dd160924ab183030.jpg" height="125px"/></a>
						<p>谁先爱上他的</p>
                    </li>
                </ul>	
				</div>
				<div class="leftDiv3">
					<a href="#">查看更多</a>
				</div>
			</div>
			<div id="rightBody">
				<div class="rightDiv1">
				<h2>酷文</h2>
				<ul>
					<li>
						<h3><a href="#" tarhet="black">随便写点什么</a></h3>
						<p>随便写点随便写点随便写点随便写点随便写肥肉哥哥个任务点</p>
					</li>
					<li>
						<h3><a href="#" tarhet="black">随便写点什么</a></h3>
						<p>随便写点随便写点随便写点随便写点随便写肥肉哥哥个任务点</p>
					</li>
					<li>
						<h3><a href="#" tarhet="black">随便写点什么</a></h3>
						<p>随便写点随便写点随便写点随便写点随便写肥肉哥哥个任务点</p>
					</li>
				</ul>
				</div>
				<div class="rightDiv2">
					<dl class="dl1">
						<dt><a href="#">随便写点</a></dt>
						<dd>随便写点</dd>
					</dl>
					<dl class="dl2">
						<dt><a href="#">随便写点</a></dt>
						<dd>随便写点</dd>
					</dl>
				</div>
			</div>
		</div>
	</div>
</div>
<div id="footer">
	<p class="p1">
		<a href="" target="_blank">首页</a>
		<a href="" target="_blank">美站</a>
		<a href="" target="_blank">酷文</a>
		<a class="last" href="" target="_blank">联系我们</a>
	</p>
	<p>
		Copyright (c) 2014 | <a href="http://www.sifangku.com" target="_blank">私房库</a>
	</p>
</div>


<script>
    $(document).ready(function(){
      var ajaxData = [
      
    ];
	  var ajd = [];
     
	$.ajax({url:"data/douban300.json",
		success:function(result){
			var i=0;
			ajd=result;
			for(i=0;i<result.subjects.length;i++)
			   {
			   var tt=result.subjects[i].title;
			   ajaxData.push(tt);
			   }
			alert();
		}});
		
    $( "#searchText" ).autocomplete({
      source: ajaxData
    });
	
	$("#searchButton").click(function(){
	
	   var usrIp=$("#searchText").val();
	   $("#runplayH").html("您刚输入："+usrIp);
       alert(usrIp);
	   
	$.ajax({url:"data/douban250.json",
	   
	    success:function(result){
	    $("#rsCount").html("ajax访问成功");
		alert(result.subjects[7].title);
		
		
		//反查用户选择的电影名称，查评分rate,查影片封面cover
		
		var rate;
		var cover;
		for (i=0;i<ajd.subjects.length;i++)
		    {
			 var currentTitle=ajd.subjects[i];
			    if(ajd.subjects[i].title==usrIp)
				{
				    rate=ajd.subjects[i].rate;
					cover=ajd.subjects[i].cover;
					 $("#rate").html("电影评分为："+rate);
				
					//return;
				}
			}


		}});
    });
});
</script>
</body>
</html>
});


